using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace WxLib.Model
{
    public class WxInitReturn
    {
        private JObject joReturn;
        public WxInitReturn(string returnString)
        {
            joReturn = JObject.Parse(returnString);
        }

        public int Rtn
        {
            get
            {
                return (int)joReturn["BaseRequest"]["Rtn"];
            }
        }
        public string ErrMsg
        {
            get
            {
                return (string)joReturn["BaseRequest"]["ErrMsg"];
            }
        }
        public SyncKey SyncKey
        {
            get
            {
                return JsonConvert.DeserializeObject((string)joReturn["SyncKey"]) as SyncKey;
            }
        }
    }
}